On the Implementation of Construction Functions for Non-free Concrete Data Types

نویسندگان

  • Frédéric Blanqui
  • Thérèse Hardin
  • Pierre Weis
چکیده

Many algorithms use concrete data types with some additional invariants. The set of values satisfying the invariants is often a set of representatives for the equivalence classes of some equational theory. For instance, a sorted list is a particular representative wrt commutativity. Theories like associativity, neutral element, idempotence, etc. are also very common. Now, when one wants to combine various invariants, it may be difficult to find the suitable representatives and to efficiently implement the invariants. The preservation of invariants throughout the whole program is even more difficult and error prone. Classically, the programmer solves this problem using a combination of two techniques: the definition of appropriate construction functions for the representatives and the consistent usage of these functions ensured via compiler verifications. The common way of ensuring consistency is to use an abstract data type for the representatives; unfortunately, pattern matching on representatives is lost. A more appealing alternative is to define a concrete data type with private constructors so that both compiler verification and pattern matching on representatives are granted. In this paper, we detail the notion of private data type and study the existence of construction functions. We also describe a prototype, called Moca, that addresses the entire problem of defining concrete data types with invariants: it generates efficient construction functions for the combination of common invariants and builds representatives that belong to a concrete data type with private constructors.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A study on strength and durability of self-compacting concretes made of recycled aggregates

Given the development of construction industry and design and implementation of high rise buildings with complex sections and various geometrical forms, the use of self-compacting concretes has received the attention of construction engineers and provided great advantages. Due to the increasing air pollution in cities, governments encounter the important issue of repelling the pollutants in whi...

متن کامل

Investigation of Some Properties and Durability of Concrete in Urumie Lake

Deterioration of concrete, which is mainly due to ignorance of environmental and service conditions, causes considerable costs for the construction industry. With this in mind, in this paper, results of investigation into the major causes of concrete deterioration in the Urumie Lake are presented. For the purposes of this investigation, samples were obtained by mixing two types of cement (OPC t...

متن کامل

Automatic generation of certified construction functions guaranteeing algebraic invariants on concrete data types

Concrete data types and pattern-matching are salient features of modern programming languages as powerful ways of defining and manipulating data structures. Among other things (eg. abstract syntax trees, regular expressions, DNA sequences, chemistry, cellular automata), the developments of XML greatly increases the interest in more complex pattern-matching for easily writing programs transformi...

متن کامل

On the Analysis of FGM Beams: FEM with Innovative Element

This paper aims at presenting a new efficient element for free vibration and instability analysis of Axially Functionally Graded Materials (FGMs) non-prismatic beams using Finite Element Method (FEM). Using concept of Basic Displacement Functions (BDFs), two- node element extends  to three-node element for obtaining much more exact results using FEM. First, BDFs are introduced and computed usin...

متن کامل

Prediction of Pervious Concrete Permeability and Compressive Strength Using Artificial Neural Networks

Pervious concrete is a concrete mixture prepared from cement, aggregates, water, little or no fines, and in some cases admixtures. The hydrological property of pervious concrete is the primary reason for its reappearance in construction. Much research has been conducted on plain concrete, but little attention has been paid to porous concrete, particularly to the analytical prediction modeling o...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007